package myadmin.jtthink.com.Mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import myadmin.jtthink.com.Models.UserRoleModel;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface UserRoleMapper extends BaseMapper<UserRoleModel> {
    @Select(" select b.id,a.user_id,a.user_name,b.role_id,c.role_name   " +
            " from ruser a left join user_role b on a.user_id=b.user_id left join role c   " +
            " on   b.role_id=c.id where   a.user_id=#{id}")
      List<UserRoleModel> getUserRole(@Param("id") int id);
}
